# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=vega
pkgver=1.0
pkgrel=10
groups=('blackarch' 'blackarch-webapp')
pkgdesc='An open source platform to test the security of web applications.'
url='https://github.com/subgraph/Vega/wiki'
arch=('x86_64' 'aarch64')
license=('GPL2')
depends=('java-environment' 'webkit2gtk')
source=('https://support.subgraph.com/downloads/VegaBuild-linux.gtk.x86_64.zip')
sha512sums=('1a7684c9dda96e3595d7e17fc5ec88072a1baf27')

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a * "$pkgdir/usr/share/$pkgname/"

cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec /usr/share/$pkgname/Vega "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

